package com.fish.web.controller.system;

import com.fish.common.config.FishConfig;
import com.fish.common.utils.StringUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页
 *
 * @author fish
 */
@Tag(name = "首页")
@RestController
public class SysIndexController {

    /**
     * 系统基础配置
     */
    @Resource
    private FishConfig fishConfig;

    /**
     * 访问首页，提示语
     */
    @Operation(summary = "访问首页", description = "提示语")
    @RequestMapping("/")
    public String index() {
        return StringUtils.format("欢迎使用{}后台管理框架，当前版本：v{}，请通过前端地址访问。", fishConfig.getName(), fishConfig.getVersion());
    }
}
